package com.aizhixin.test.question.controller;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.aizhixin.test.question.dto.anserEverydayDTO;
import com.aizhixin.test.question.service.answerEverydayService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import lombok.extern.slf4j.Slf4j;

@RestController
@RequestMapping(value="v1/open/answerEverdayRecord")
@Api(tags="每日记录API")
@Slf4j
public class answerEverydayController {
	@Autowired
	private answerEverydayService answerEverydayService;
	@GetMapping(value="/{userId}",produces=MediaType.APPLICATION_JSON_VALUE)
	@ApiOperation(httpMethod="GET",value="传进一个用户ID，然后调用用户每日的答题记录",
	notes="传进一个用户ID，然后调用用户每日的答题记录<br><br><b>@author xixi</b>")
	public List<anserEverydayDTO> geAnserEverydayrecored(
	@ApiParam(value="用户ID",required=true)
	@PathVariable int userId) {
		return answerEverydayService.geteverDayAnswerImformation(userId);
		
	}
}
